<%files = Files.find(:all,:conditions=>["session_id = ?",uni_id])%>
<%files.each_with_index do |f,i|%>
<div style="padding:2px;margin-bottom:1px;margin-right:40px;" id="file_rc_<%=f.id%>">
<span class='float_right'>
    <%="File Category".t%>: 
    <span id='cat_show_<%=f.id%>'>
     <%if @project.use_permission%>
       <%=render :partial=>'categories/cat_show_per',:locals=>{:cats=>@project.file_categories,:cur_cat=>(f.category_id || "0"),:label=>'files',:fid=>f.id,:i=>i}%>
     <%else%>
       <%=render :partial=>'categories/cat_show',:locals=>{:cats=>@project.file_categories,:cur_cat=>(f.category_id || "0"),:label=>'files',:fid=>f.id,:i=>i}%>
     <%end%>
    </span>
</span>
<%=check_box_tag "file_ids[#{i}][]",f.id,{:checked=>true}%>
<%=icon f.content_type,16%><%=link_to f.name + " (<i>" + f.content_type.to_s + "</i>) " + number_to_human_size(f.size.to_i),"/files/#{params[:project_id]}/#{f.name}"%>
</div>
<%end%>
